/*
#include <stack>
#include <math.h>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <iostream>
#include <sstream>
using namespace std;

bool isInterleave2(string s1, string s2, string s3) {
	if(s3=="")
		return true;
	if(s1==""&&s2=="")
		return false;
	if(s1!=""&&s1[0]==s3[0]){
		bool re= isInterleave2(s1.substr(1,s1.length()-1),s2,s3.substr(1,s3.length()-1));
		if(re)
			return true;
	}
	if(s2!=""&&s2[0]==s3[0]){
		bool re= isInterleave2(s1,s2.substr(1,s2.length()-1),s3.substr(1,s3.length()-1));
		if(re)
			return true;
	}
	return false;
}
bool isInterleave(string s1, string s2, string s3) {
	bool dp[101][101];
	memset(dp,false,sizeof(bool)*101*101);
	int len1=s1.length(),len2=s2.length(),len3=s3.length();
	if(len1+len2!=len3)
		return false;
	dp[0][0]=true;
	for(int i=1;i<=len1;i++){
		if(s1[i-1]==s3[i-1]){
			dp[i][0]=true;
		}else
			break;
	}
	for(int i=1;i<=len2;i++){
		if(s2[i-1]==s3[i-1]){
			dp[0][i]=true;
		}else
			break;
	}
	int tmp;
	for(int i=1;i<=len1;i++){
		for(int k=1;k<=len2;k++){
			tmp=i+k;
			if(s1[i-1]==s3[tmp-1])
				dp[i][k]=dp[i-1][k]||dp[i][k];
			if(s2[k-1]==s3[tmp-1])
				dp[i][k]=dp[i][k-1]||dp[i][k];
		}
	}
	return dp[len1][len2];
}
int main(){
	int a[]={1,2,3,4,5};
	vector<int> nums1(a,a+sizeof(a)/sizeof(int));

	cout<<isInterleave("","b","b");
	cout<<endl;
	system("pause");
}
*/